1. Field of the Invention
This invention relates generally to digital filters and more particularly to providing programmable frequency crossover filters and programmable parametric equalizer filters.
2. Discussion of Background Art
A speaker system usually includes several speakers which each handles a different range of frequencies, such as bass, mid-range, and high frequencies. The boundaries of frequency response for each speaker define crossover points beyond which crossover filters (or crossovers) block out-of-bound signals. Commercially available sub-woofers, for example, usually allow a user to change crossovers.
A frequency response equalizer permits a user to adjust an amplitude gain at a specified frequency without affecting other frequencies. Equalizers are typically implemented as a series or cascade of individual filters, each with an independently adjustable gain to give the overall system the desired frequency response. Equalizers may be classified as graphic or parametric. Graphic equalizers are banks of filters in which only the gain or attenuation of each filter may be adjusted, while the frequency response of an individual filter may not be adjusted. Parametric equalizers are banks of filters in which the center frequency, bandwidth or Q, and the expected gain or attenuation at the center frequency may all be adjusted.
Audio signal crossover filtering and equalization are generally done as separate functions in the analog or digital domain. Analog filter crossover points are tuned by adjusting the filter component (inductors, resistors, etc.) values, which changes the positions of the poles of the filter. Similarly, analog implementations of parametric equalizers allow adjustments of multiple components until the desired response is achieved. Passive analog components increase circuit sizes, may vary or xe2x80x9cdriftxe2x80x9d over time, and thus cause system instability.
Digital filter crossover points are tuned by re-computing the filter coefficients, typically using software running on a general-purpose computer like a personal computer (PC), and then providing the recomputed coefficients to the program which implements the filter. The filter program may be running on the same computer that calculates the coefficients or may be running on a separate digital signal processor (DSP). The software which computes the coefficients typically designs an analog filter, then performs a bilinear transformation, and then performs a frequency domain transformation using an algorithm as described in signal processing texts such as Proakis and Manolakis, xe2x80x9cDigital Signal Processing Principles, Algorithms, and Applications,xe2x80x9d 3rd edition, 1996, Prentice-Hall, sections 8.3.3 and 8.4.2, pp 677-699. For example, a second order Butterworth high-pass filter with a xe2x88x923 dB cut-off frequency of 1 kHz can be designed through the following steps:
1. Designing an analog 2nd order low-pass Butterworth filter with a cutoff frequency of 1 rad/sec, which has a transfer function of       H    ⁡          (      s      )        =      1                  (                  s          -                      ⅇ                          j              ⁢                                                3                  ⁢                  π                                4                                                    )            ⁢              (                  s          -                      ⅇ                          j              ⁢                                                5                  ⁢                  π                                4                                                    )            
2. Transforming the analog filter to a digital filter with a sampling frequency fs by substituting   s  =      2    ⁢                  f        s            ⁡              (                              1            -                          z                              -                1                                                          1            +                          z                              -                1                                                    )            
which yields a transfer function H(z) of a filter that has a cut-off frequency of 1/2xcfx80 Hz.
3. Evaluating the parameter a for the frequency domain as   a  =            sin      ⁡              (                              1            -                          2              ⁢              π              ⁢                              xe2x80x83                            ⁢                              f                c                                              2                )                    sin      ⁡              (                              1            +                          2              ⁢              π              ⁢                              xe2x80x83                            ⁢                              f                c                                              2                )            
where fc is the cutoff frequency of 1000Hz.
This is used to transform the variable z in the transfer function as       z          -      1        →                    z                  -          1                    -      a              1      -              az                  -          1                    
After the substitution in H(z), the numerator and denominator of H(z) are simplified to the form       H    ⁡          (      z      )        =                    b        0            +                        b          1                ⁢                  z                      -            1                              +                        b          2                ⁢                  z                      -            2                                      1      +                        a          1                ⁢                  z                      +            1                          ⁢                  a          2                ⁢                  z                      -            2                              
The terms b0, b1, b2, a1, and a2 are the coefficients of the desired digital filter.
In digital equalizers, the filter coefficients are computed off-line and loaded into the device or program performing the actual digital filter. The equalizer coefficient computation routine typically follows the approach described in P. A. Regalia and S. K. Mitra, xe2x80x9cTunable Digital Frequency Response Equalization Filters,xe2x80x9d IEEE Trans. ASSP, vol. 35, no.1, pp. 118-120, January 1997. Once again, the basis for the design is an analog filter, which is transformed using a bilinear transformation. The filter structure is as shown in FIG. 1, which yields a transfer function
F(z)=xc2xd[1+A(z)]+xc2xdK[1xe2x88x92A(z)],
where       A    ⁡          (      z      )        =                    z                  -          2                    +                        b          ⁡                      (                          1              +              a                        )                          ⁢                  z                      -            1                              +      a              1      +                        b          ⁡                      (                          1              +              a                        )                          ⁢                  z                      -            1                              +              az                  -          2                    
and parameters a and b are related to the desired center frequency and bandwidth specifications of the filter.
FIG. 2A shows the frequency response obtained for different values of K, illustrating variable gains at a specified normalized center frequency. FIG. 2B illustrates the effect of varying b while K and a are held constant. FIG. 2C shows how a peak bandwidth may be varied by adjusting only a.
Traditionally, designers use parameters (cutoff frequency, bandwidth, etc.) of the desired frequency response to calculate the filter coefficients (K, a, b, etc.) for the crossovers and/or parametric equalizers. However, this approach requires complicated mathematical calculations, and each time a new set of coefficient values is desired, the user must start with new parameters to recalculate the desired coefficients. A PC needs to be high-powered to calculate the filter. coefficients for downloading to a chip. Further, digital implementations of filters typically require users to know DSP programming or to perform complicated filter algorithms.
What is needed, therefore, is a digital filter that can overcome the above-discussed deficiencies.
The present invention provides a digital signal processing (DSP)-based, multi-channel, digital filter semiconductor chip that performs crossover filtering and parametric equalization. On individual channels crossover filters support programmable cutoff frequencies, and equalizer bands each have an independently adjustable center frequency. The chip can work either in a stand-alone mode receiving filter settings from an external EEPROM, or under control of a microprocessor. Firmware for calculating filter coefficients. is embedded in a ROM and thus enables re-designing filters without resort to external processing intelligence. In the preferred embodiment the chip stores a low-pass prototype filter from which it derives desired filters including low-pass, high-pass, and band-pass filters. The prototype filter coefficients are expressed in poles and zeros to save memory space and to simplify calculations of coefficients. The chip also uses a double precision structure including error correction circuitry to preserve details of coefficient values.